<template>
  <div class="c_title">
    <div class="inf">
      <slot name="title"> </slot>

      <span class="tag">
        <slot name="new"></slot>
      </span>
      <span class="tag_inf">
        <slot name="inf"></slot>
      </span>
    </div>
    <div class="go" @click="goMore">更多<i></i></div>
  </div>
</template>

<script>
import CTitle from "@/components/ctitle/CTitle.vue";
export default {
  components: {
    CTitle,
  },
  props: {
    num: {
      type: Number,
    },
  },
  methods: {
    goMore() {
      if(this.num){
        this.$router.push("/hot_new_goods/" +this.num );
      }else{
        this.$router.push('/category')
      }
      
    },
  },
};
</script>

<style lang="scss" scoped>
.c_title {
  width: 100%;
  padding: 17px 15px 0;
  display: flex;
  justify-content: space-between;
  .inf {
    font-size: 15px;
    color: #282828;
    width: 300px;
    font-weight: 700;
    position: relative;
    .tag {
      position: absolute;
      top: 1px;
      left: 66px;
      font-size: 12px;
      font-weight: 700;
      color: #fc4141;
    }
    .tag_inf {
      font-size: 12px;
      color: #fc4141;
    }
  }
  .go {
    font-size: 13px;
    color: #333;
    i {
      display: inline-block;
      vertical-align: top;
      width: 18px;
      height: 18px;
      background: url(../../assets/icon/common/right_arrow.svg) no-repeat;
      background-size: 100% 100%;
      margin-left: -6px;
    }
  }
}
</style>

